﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Newreport.aspx.cs" Inherits="admin.admin_Newreport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<link href="../styles/admin.css" rel="stylesheet" type="text/css" />
	<title>Create Vibartion Report</title>

	<script runat="server">
		protected void Check_Change(Object sender, EventArgs e)
		{

			Comment_tb.ReadOnly = CheckBox_oldreport.Checked;
		}
		
	</script>
	<script>
		function ShowTable() {
			document.getElementById('<%=  tablePanel.ClientID %>').style.display = "block";
			document.getElementById("HiddenControl1").value = "block";
		}
		function HideTable() {
			document.getElementById('<%=  tablePanel.ClientID %>').style.display = "none";
			document.getElementById("HiddenControl1").value = "none";

		}
	</script>

	<style type="text/css">
		*
		{
			font-size: 18px;
			font-family: 'Myriad Web Pro' , 'Myriad' , 'Myriad Pro' , 'Helvetica' , Arial, Sans-Serif;
		}
	</style>
	<style type="text/css">
		.style3
		{
			width: 489px;
		}
		.style6
		{
			width: 150px;
		}
		.style7
		{
			padding-top: 9px;
			font-size: 14px;
			vertical-align: baseline;
			margin: 0px;
		}
		.style8
		{
			padding-top: 9px;
			width: 148px;
			font-size: 14px;
			vertical-align: baseline;
			margin: 0px;
		}
		.style10
		{
			padding-top: 9px;
			width: 148px;
			font-size: 14px;
			vertical-align: baseline;
			margin: 0px;
			height: 31px;
		}
		.style11
		{
			height: 31px;
		}
		.style13
		{
			height: 31px;
			width: 353px;
		}
		.style14
		{
			width: 353px;
		}
	</style>
</head>
<body style="min-height: 1100px">
	<form id="form1" runat="server" class="cssCommentTable">
	<div id="right_content">
		<div class="content_area">
			<h2>
				<asp:Label runat="server" ID="Title" Text="Create New Report" >&nbsp;</asp:Label>
			</h2>
			<h3>
				<asp:Label ID="Label1" runat="server" Text="Current Component:"></asp:Label>
				&nbsp;
				<asp:Label ID="componentLabel" runat="server" Text="Shaft"></asp:Label>
				&nbsp;
			</h3>
			<div>
				<div>
					<table runat="server" class="cssCommentTable" width="500px">
						<tr>
							<td class="style6">
								<asp:Label  runat = "server" ID="lblPreviousReport" Text="Previous Report on "></asp:Label>:<asp:Label ID="Pre_date" runat="server"></asp:Label>
							</td>
							<td class="style3">
								<asp:TextBox ID="PreviousComment" ReadOnly="true" TextMode="MultiLine" runat="server"
									Width="500px" CssClass="fontfamily"></asp:TextBox>
							</td>
						</tr>
						<tr>
							<td class="style6">
							</td>
							<td class="style3">
								<asp:CheckBox ID="CheckBox_oldreport" OnCheckedChanged="Check_Change" Text=" Use this report"
									runat="server" />
							</td>
						</tr>
						<tr>
							<td class="style7">
								<label>
									Severity:</label>
							</td>
							<td class="style3">
								<asp:DropDownList ID="dropdownlist_status" runat="server" AutoPostBack="true" OnSelectedIndexChanged="statusChanged"
									Width="500px">
									<asp:ListItem Text="All" Value="0"></asp:ListItem>
									<asp:ListItem Text="NORMAL" Value="1"></asp:ListItem>
									<asp:ListItem Text="ABNORMAL" Value="2"></asp:ListItem>
									<asp:ListItem Text="MODERATE" Value="3"></asp:ListItem>
									<asp:ListItem Text="SEVERE" Value="4"></asp:ListItem>
									<asp:ListItem Text="NOT TESTED" Value="5"></asp:ListItem>
								</asp:DropDownList>
							</td>
						</tr>
						<tr>
							<td class="style7">
								<label>
									Select Comment:</label>
							</td>
							<td class="style3">
								<asp:ScriptManager ID="ScriptManager2" runat="server">
								</asp:ScriptManager>
								<asp:UpdatePanel ID="UpdatePanel_comment" runat="server">
									<ContentTemplate>
										<asp:DropDownList ID="dropdownlist_comment" runat="server" DataTextField="comments"
											AutoPostBack="true" OnSelectedIndexChanged="CommentChanged" DataValueField="comments"
											Width="500px">
										</asp:DropDownList>
									</ContentTemplate>
									<Triggers>
										<asp:AsyncPostBackTrigger ControlID="dropdownlist_status" />
									</Triggers>
								</asp:UpdatePanel>
							</td>
						</tr>
						<tr>
							<td class="style7" colspan="2">
								<asp:linkButton ID="btn_ShowNewCommentTable" OnClientClick="ShowTable();return false;" runat="server"><asp:label ID="lb" runat="server">Show New Comment Fields</asp:label></asp:linkButton>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<asp:linkButton ID="btn_HideNewCommentTable" OnClientClick="HideTable();return false;" runat="server"><asp:label runat="server">Hide</asp:label></asp:linkButton>
							</td>							
							<td class="style7" colspan="2">
								&nbsp;</td>
						</tr>
					</table>
					<div id="div_createNew" runat="server">
						<asp:Panel runat="server" ID="tablePanel" Visible="true">
							<asp:Table ID="tb_creatNew" runat="server" class="cssCommentTable">
								<asp:TableRow>
									<asp:TableCell  Width="150px">
										<asp:Label ID="Label8" runat="server"> Fault1 Condition</asp:Label>
									</asp:TableCell>
									<asp:TableCell class="style14">
										<asp:UpdatePanel ID="UpdatePanel6" runat="server">
											<ContentTemplate>
												<asp:DropDownList ID="Fault1_DropDownList" runat="server"
													Width="330px">
										<asp:ListItem Text="Please Select" Value="0"></asp:ListItem>
												</asp:DropDownList>
												&nbsp;
											</ContentTemplate>
										</asp:UpdatePanel>
										</asp:TableCell>
										<asp:TableCell>
										<asp:DropDownList ID="Severity1_DropDownList" runat="server"
											Width="150px">
											<asp:ListItem Text="Please Select" Value="0"></asp:ListItem>
											<asp:ListItem Text="NORMAL" Value="1"></asp:ListItem>
											<asp:ListItem Text="ABNORMAL" Value="2"></asp:ListItem>
											<asp:ListItem Text="MODERATE" Value="3"></asp:ListItem>
											<asp:ListItem Text="SEVERE" Value="4"></asp:ListItem>
											<asp:ListItem Text="NOT TESTED" Value="5"></asp:ListItem>
										</asp:DropDownList>
									</asp:TableCell>
								</asp:TableRow>
								<asp:TableRow>
									<asp:TableCell class="style10">
										<asp:Label ID="Label2" runat="server"> Fault2 Condition</asp:Label>
									</asp:TableCell>
									<asp:TableCell class="style13">
										<asp:UpdatePanel ID="UpdatePanel_severity" runat="server">
											<ContentTemplate>
												<asp:DropDownList ID="Fault2_DropDownList" runat="server" 
													Width="330px">
													<asp:ListItem Text="Please Select" Value="0"></asp:ListItem>
												</asp:DropDownList>
												&nbsp;
											</ContentTemplate>
											<Triggers>
												<asp:AsyncPostBackTrigger ControlID="Fault1_DropDownList" />
											</Triggers>
										</asp:UpdatePanel>
									</asp:TableCell>
									<asp:TableCell class="style11">
										<asp:DropDownList ID="Severity2_DropDownList" runat="server"
											Width="150px">
											<asp:ListItem Text="Please Select" Value="0"></asp:ListItem>
											<asp:ListItem Text="NORMAL" Value="1"></asp:ListItem>
											<asp:ListItem Text="ABNORMAL" Value="2"></asp:ListItem>
											<asp:ListItem Text="MODERATE" Value="3"></asp:ListItem>
											<asp:ListItem Text="SEVERE" Value="4"></asp:ListItem>
											<asp:ListItem Text="NOT TESTED" Value="5"></asp:ListItem>
										</asp:DropDownList>
									</asp:TableCell>
								</asp:TableRow>
								<asp:TableRow ID="fault3con">
									<asp:TableCell class="style8">
										<asp:Label ID="Label5" runat="server"> Fault3 Condition</asp:Label>
									</asp:TableCell>
									<asp:TableCell class="style14">
										<asp:DropDownList ID="Fault3_DropDownList" runat="server"
											Width="330px">
										<asp:ListItem Text="Please Select" Value="0"></asp:ListItem>
										</asp:DropDownList>
										&nbsp;</asp:TableCell>
									<asp:TableCell>
										<asp:DropDownList ID="Severity3_DropDownList" runat="server"
											Width="150px">
											<asp:ListItem Text="Please Select" Value="0"></asp:ListItem>
											<asp:ListItem Text="NORMAL" Value="1"></asp:ListItem>
											<asp:ListItem Text="ABNORMAL" Value="2"></asp:ListItem>
											<asp:ListItem Text="MODERATE" Value="3"></asp:ListItem>
											<asp:ListItem Text="SEVERE" Value="4"></asp:ListItem>
											<asp:ListItem Text="NOT TESTED" Value="5"></asp:ListItem>
										</asp:DropDownList>
									</asp:TableCell>
								</asp:TableRow>
								<asp:TableRow>
									<asp:TableCell>
									<asp:label  runat="server" >Resurvey Frequency:</asp:label>
									</asp:TableCell>
									<asp:TableCell>
										<asp:DropDownList ID="Resurvey_DropDownList" runat="server" Width="330px">
										</asp:DropDownList>
									</asp:TableCell>
									<asp:TableCell></asp:TableCell>
								</asp:TableRow>
							</asp:Table>
						</asp:Panel>
					</div>
					<table class="cssCommentTable">
						<td class="style6">
							<asp:Label ID="Generate_Button" runat="server" Text="Report"
								Width="130px" />
						</td>
						<td>
							<asp:UpdatePanel ID="UpdatePanel2" runat="server">
								<ContentTemplate>
									<asp:TextBox ID="Comment_tb" runat="server" TextMode="MultiLine" Text="Show the report here"
										MaxLength="1000" Rows="5" Width="500px" />
								</ContentTemplate>
								<Triggers>
									<asp:AsyncPostBackTrigger ControlID="dropdownlist_comment" />
									<asp:AsyncPostBackTrigger ControlID="dropdownlist_status" />
								</Triggers>
							</asp:UpdatePanel>
						</td>
						<tr>
							<td class="style7">
								<asp:Label runat="server" ID="matrix_label" Visible="true" Font-Bold="true" Font-Size="Medium"
									ForeColor="Red">Matrix</asp:Label>
							</td>
							<td>
								<asp:DropDownList ID="DropDownList_Matrix" runat="server">
									<asp:ListItem Text="NORMAL(0-75)" Value="1">
									</asp:ListItem>
									<asp:ListItem Text="ABNORMAL(75-100)" Value="2">
									</asp:ListItem>
									<asp:ListItem Text="MODERATE(100-125)" Value="3">
									</asp:ListItem>
									<asp:ListItem Text="SEVERE(125-150)" Value="4">
									</asp:ListItem>
									<asp:ListItem Text="NOT TESTED(0-150)" Value="5">
									</asp:ListItem>
								</asp:DropDownList>
								<asp:TextBox ID="Matrix_Textbox" runat="server">75</asp:TextBox>
								<asp:CustomValidator ID="MatrixValidator" runat="server" ValidationGroup="reportgroup"
									OnServerValidate="ServerValidate" ControlToValidate="Matrix_Textbox" ErrorMessage="Err Input"></asp:CustomValidator>
							</td>
						</tr>
						<tr>
							<td class="style6">
								<asp:Button ID="submit_button" runat="server" Text="Submit" ValidationGroup="reportgroup"
									OnClick="submit_button_Click" />
							</td>
							<td>
								<a href="EmailNotification.aspx?report_type=VA" target="_parent">EMAIL NOTIFICATION</a>
							</td>
							<td>
							<input type="hidden" ID="HiddenControl1" runat="server"/>
							</td>
						</tr>
					</table>
				</div>
				<asp:HyperLink ID="HyperLink1" runat="server" Target="_parent" NavigateUrl="~/admin/Create_Report.aspx">Return</asp:HyperLink>
			</div>
		</div>
	</div>
	</form>
</body>
</html>
